import s from '../UITools.module.less'
import { NumberInput } from '../NumberInput'
import { FlexItem, uiEditorModel } from '@renderer/UIEditor/model/ui-editor-model'

export function SpaceTools(props: { item: FlexItem }) {
  return (
    <>
      <div className={s.uiToolsInfoLine}>
        <span className={s.uiToolsInfoLineLabel}>Size:</span>
        <NumberInput
          value={props.item.width}
          setValue={(v) => {
            uiEditorModel.setItemSize(props.item.id, v)
          }}
        />
      </div>
    </>
  )
}
